Storing Lines

Why would one wish to store a single particle line? It might be that diagram has the same line repeated over and over commencing from different starting points. The user may simply like a particular line style and length and want to always use it (for instance an E FLIPPEDFLAT gluon five loops in length). To store a line under the name <line name> the basic command is:

\drawandsaveline `<line name>' as <the same arguments as \drawline>
Note the `...' around the name (which must commence with a backslash). As an example one could have
\drawandsaveline `\cutephoton' as \photon[\S\LONGPHOTON](-2000,500)[7]
which would draw a photon as if
\drawline\photon[\S\LONGPHOTON](-2000,500)[7]
had appeared but save it under the name cutephoton.

To utilize the saved line one enters

\drawoldpic<line name>(x,y)
where (x,y) is the co-ordinate to draw the line from. For example
\drawandsaveline `\cutephoton' as \photon[\S\LONGPHOTON](-2000,500)[7]
\drawline\fermion[\E\REG](\pbackx,\pbacky)[6500]
\drawoldpic\cutephoton(1500,\pbacky)
\drawoldpic\cutephoton(2500,\pbacky)
\drawoldpic\cutephoton(3500,\pbacky)
drawoldpic re-assigns the values of pfrontx,y; pmidx,y and pbackx,y but does not alter any other existing paramenters such as plengthx, gluonbacky or photoncount. (pfrontx,pfronty) are assigned the (x,y) values and (pbackx,pbacky) are incremented by the current values of plengthx and plengthy. Subsequent usage of drawoldpic costs no additional internal TEX memory resources. The above example would draw:


\begin{picture}(12000,18000)
\drawandsaveline \lq \cutephoton' as \photon[\S\LONGPH...
...dpic\cutephoton(2500,\pbacky)
\drawoldpic\cutephoton(3500,\pbacky)
\end{picture}
The storage space for cutephoton will be reclaimed following the \end{picture} statement. Two other features exist to draw lines. At any time, while in picture mode, the last line drawn via the command is stored under the name `lastline' and may be freely used. lastline is replaced when is next encountered. Note that you may never use the same name twice when storing a line. To illustrate the use of lastline, a portion of the previous example could be produced using:

\drawline\fermion[\E\REG](0,16000)[6500]
\drawline\photon[\S\LONGPHOTON](1500,\pbacky)[7]
\drawoldpic\lastline(2500,\pfronty)
\drawoldpic\lastline(3500,\pfronty)
to wit


\begin{picture}(12000,14000)
\drawline\fermion[\E\REG](0,12000)[6500]
\drawline\...
...oldpic\lastline(2500,\pfronty)
\drawoldpic\lastline(3500,\pfronty)
\end{picture}

One may also store a line after it has been drawn by using the saveas command. The statements:

\drawline\photon[\S\LONGPHOTON](0,18000)[7]
\saveas `\cutephoton'
would be equivalent to the statement
\drawandsaveline `\cutephoton' as \photon[\S\LONGPHOTON](0,18000)[7]
The latter statement is superior, however, since saveas actually re-draws the line (in a phantom mode) and thus uses twice as much of TEX's resources. Thus saveas should be avoided and has been mentioned merely for completeness. Since it saves the last line drawn it is most useful when used subsequent to a statement.